<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<script type="text/javascript">
	function del(id) {
		if(confirm("是否删除这条记录！")){
			window.location="student?method=delete&id="+id;
		}
	}
	
</script>
<button type="button" onclick="add()">新增</button>
<table border="1">
	<thead>
		<tr>
			<th>学号</th>
			<th>姓名</th>
			<th>密码</th>
			<th colspan="2">操作</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach items="${list}" var="s">
			<tr>
				<td>${s.stuNo}</td>
				<td>${s.name}</td>
				<td>${s.password}</td>
				<td><a href="javaScript:update2(${s.id})">修改</a></td>
				<td><a href="javaScript:del(${s.id})">删除</a></td>
			<tr>
		</c:forEach>
	</tbody>
</table>
